<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui"
      >
     
    <body>

        <ui:composition template="./TemplatePrincipal.xhtml">

          

            <ui:define name="content">
                <f:view>
                    <p:panel header="lista de articulos">
                    <h:form>
                        <p:commandButton action="ArticulosCrearEditar" value="agregar articulos" actionListener="#{articleBean.prepararNuevo}" ajax="false"/>
                        <p:commandButton action="MenuPrincipal" value="menu principal" ajax="false"/>
                        
                        <p:dataTable value="#{articleBean.lista}" var="item">
                            <p:column>
                                <f:facet name="header">
                                    <h:outputText value="Idarticulo"/>
                                </f:facet>
                                <h:outputText value="#{item.idarticulo}"/>
                            </p:column>
                            <p:column>
                                <f:facet name="header">
                                    <h:outputText value="Estado"/>
                                </f:facet>
                                <h:outputText value="#{item.tipollanta}"/>
                            </p:column>
                            <p:column>
                                <f:facet name="header">
                                    <h:outputText value="Marca"/>
                                </f:facet>
                                <h:outputText value="#{item.marca}"/>
                            </p:column>
                            <p:column>
                                <f:facet name="header">
                                    <h:outputText value="Rodado"/>
                                </f:facet>
                                <h:outputText value="#{item.rodado}"/>
                            </p:column>
                            <p:column>
                                <f:facet name="header">
                                    <h:outputText value="Numeracion"/>
                                </f:facet>
                                <h:outputText value="#{item.numeracion}"/>
                            </p:column>
                            <p:column>
                                <f:facet name="header">
                                    <h:outputText value="Precio"/>
                                </f:facet>
                                <h:outputText value="#{item.precio}"/>
                            </p:column>
                            <p:column>
                                <f:facet name="header">
                                    <h:outputText value="Garantia"/>
                                </f:facet>
                                <h:outputText value="#{item.garantia}"/>
                            </p:column>
                            <p:column>
                                <f:facet name="header">
                                    <h:outputText value="Clave"/>
                                </f:facet>
                                <h:outputText value="#{item.clave}"/>
                            </p:column>
                            <p:column>
                                <f:facet name="header">
                                    <h:outputText value="eliminar"/>
                                </f:facet>
                                <p:commandButton action="ArticulosCrearEditar" value="eliminar" actionListener="#{articleBean.prepararEliminar}" ajax="false"/>
                                <p:commandButton action="ArticulosCrearEditar" value="editar" actionListener="#{articleBean.prepararEditar}" ajax="false"/>
                            </p:column>
                        </p:dataTable>
                    </h:form>
                        </p:panel>
                </f:view>


            </ui:define>

        </ui:composition>

    </body>
</html>
